<!--{__NOLAYOUT__}-->
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>登录 | 后台管理</title>
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="stylesheet" href="__STATIC__/css/app.min.css">
    <script src="__STATIC__/js/app.min.js"></script>
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body class="hold-transition login-page" style="background-image: url('__STATIC__/images/background/{$bg_num}.jpg');">
<div class="login-box">
    <div class="login-logo">
        <a style="color: white;font-family: 'Microsoft Yahei'">后台登录</a>
    </div>
    <!-- /.login-logo -->
    <div class="login-box-body" style="border-radius: 10px;">
        <p class="login-box-msg">欢迎来到Bear后台管理系统</p>
        <form action="" method="post" onsubmit="member()">
            <div class="row">
                <div class="col-xs-12">
                    <div class="form-group has-feedback">
                        <input id="user_name" name="user_name" type="text" class="form-control" placeholder="帐号">
                        <span class="glyphicon glyphicon-user form-control-feedback"></span>
                    </div>
                </div>
            </div>
            {if $Think.session.error_message}
            {include file="template/loginerror" /}
            {/if}
            <div class="row">
                <div class="col-xs-12">
                    <div class="form-group has-feedback">
                        <input name="password" type="password" class="form-control" placeholder="密码">
                        <span class="glyphicon glyphicon-lock form-control-feedback"></span>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-8">
                    <div class="checkbox">
                        <label id="remember_me">
                            <input id="remember_checkbox" type="checkbox"> 记住我
                        </label>
                    </div>
                </div>
                <div class="col-xs-4">
                    <input placeholder="记住密码" hidden name="is_remember" id="is_remember" value="0">
                    {:token()}
                    <button type="submit" class="btn btn-primary btn-block btn-flat">登录</button>
                </div>
            </div>
        </form>
    </div>
</div>
<!-- /.login-box -->
<script>
    function member() {
        if ($('#remember_checkbox').prop('checked')) {
            console.log(1);
            $('#is_remember').val(1);
        } else {
            $('#is_remember').val(0);
            console.log(0);
        }
    }

    $(function () {
        $("#user_name").focus();
    });
</script>
</body>
</html>